package cn.tedu.community.commons.pojo.notice.dto;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 添加公告DTO
 */
@Data
public class NoticeUpdateDTO implements Serializable {
    @NotNull(message = "请输入标题！")
    @Pattern(regexp = "([\\w\\W]{2,20}$)", message = "请输入2~20个字符的标题!")
    private String title;

    private String photo;

    @NotNull(message = "请输入正文文章！")
    @Pattern(regexp = "([\\w\\W]{2,1000}$)", message = "请输入2~1000个字符的正文文章!")
    private String content;

}
